package org.termine.entity;

import java.io.Serializable;

public class Location implements Serializable {

	private static final long serialVersionUID = 7214720977289507096L;

	private Integer location_id;
	private String country;
	private String city;
	private String zip;
	private String street;
	private double latitude;
	private double longitude;

	public Location copy() {
		Location clone = new Location();
		clone.setLocation_id(location_id);
		clone.setCountry(country);
		clone.setCity(city);
		clone.setZip(zip);
		clone.setStreet(street);
		clone.setLatitude(latitude);
		clone.setLongitude(longitude);
		return clone;
	}
	
	public boolean isValid() {
		if (country != null && city != null && zip != null && street != null) {
			if (!country.equals("") && !city.equals("") && !zip.equals("") && !street.equals("")) {
				return true;
			}
		}
		return false;
	}

	/*
	 * Getters & Setters
	 */
	public double getLatitude() {
		return latitude;
	}

	public void setLatitude(double latitude) {
		this.latitude = latitude;
	}

	public double getLongitude() {
		return longitude;
	}

	public void setLongitude(double longitude) {
		this.longitude = longitude;
	}

	public Integer getLocation_id() {
		return location_id;
	}

	public void setLocation_id(Integer location_id) {
		this.location_id = location_id;
	}

	public String getCountry() {
		return country;
	}

	public void setCountry(String country) {
		this.country = country;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getZip() {
		return zip;
	}

	public void setZip(String zip) {
		this.zip = zip;
	}

	public String getStreet() {
		return street;
	}

	public void setStreet(String street) {
		this.street = street;
	}

	@Override
	public String toString() {
		return "Location{" + "location_id=" + location_id + ", country=" + country + ", city=" + city + ", zip=" + zip
				+ ", street=" + street + '}';
	}
}
